package com.tushare.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tushare.entity.Margin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2021-03-08
 */
public interface MarginMapper extends BaseMapper<Margin> {

    Margin getLastMargin();

    List<Margin> getMarginListByTsCode(@Param("trade_date") int trade_date);

    List<Margin> getTopMarginList(@Param("limit") int limit);

    boolean saveOrUpdateBatch(@Param("list") List<Margin> list);

    boolean deleteAllMargin();

}
